﻿using System;

namespace Draco.OWF.Repository.Factory
{
    /// <summary>
    /// 
    /// </summary>
    internal class ObjectFactory
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="shortTypeName"></param>
        /// <returns></returns>
        public static Object CreateObject(String shortTypeName)
        {
            Type type = NamedType.GetNamedType(shortTypeName);
            return CreateObject(type);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static Object CreateObject(Type type)
        {
            if(type!=null)
                Activator.CreateInstance(type);
            return null;
        }
    }
}
